body {
    margin: 0;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

header, footer {
    display: flex;
    background-color: #999;
    flex: 0 1 auto;
    align-items: center;
    justify-content: center;
}

.body {
    display: flex;
    flex-grow: 1;
}

nav, aside {
    display: flex;
    background-color: #998877;
    flex: 0 0 12em;
    align-items: center;
    justify-content: center;
}

.content {
    flex-grow: 1;
}


/** ------------- 百分比布局 ------------- */

.percent-layout {
    display: flex;
    height: 100%;
    flex-direction: column;
}

.grid {
    display: flex;
}

.grid-cell {
    background-color: #ABC;
    flex: 1;
    margin: 4px;
    padding: 8px;
    text-align: center;
}

.cell-1of2 {
    flex: 0 0 50%;
}

.cell-1of3 {
    flex: 0 0 33.3333%;
}

.cell-1of4 {
    flex: 0 0 25%;
}


/* ---------------------------- */

.hang {
    display: flex;
    align-items: flex-start;
}

.avatar {
    margin-right: 1em;
}

.hang p {
    text-align: left;
    margin: 0;
}


/* -------------- 流式布局 ---------------- */

.percent-layout .grid:nth-child(4) {
    flex: 1 0 auto;
    ;
}

.flow {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
}

.flow > span {
    display: block;
    flex: 0 0 25%;
    box-sizing: border-box;
    border: 1px solid red;
    background-color: white;
    height: 48px;
}
